package com.ljx.recruitment.interview.domain.vo.resp;

import com.ljx.recruitment.interview.enums.DeliverStatusEnum;
import com.ljx.recruitment.interview.typehandler.details.DeliverDetails;
import com.ljx.recruitment.user.typehandler.details.ResumeDetails;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-11-04  14:56
 */
@Data
public class DeliverResp {

    private Long id;

    private Long uId;

    private Long jobId;

    private Integer deliverStatus;

    private Integer batch;

    private DeliverDetails deliverDetails;

    private ResumeDetails resumeDetails;

   private Integer isRecommend;

    private Date createTime;


    // ui
    private String name; // jobName

    private Integer category;

    private String categoryDesc;

    private Integer kind;

    private String kindDesc;

    private Long jobTypeId;

    private String jobTypeDesc;

    private String deliverStatusDesc;

    private Boolean isLastBatch;

    private Integer nextDeliverStatus;

    private DeliverOptResp opts;


    public Boolean isOfferStage(){
        return DeliverStatusEnum.OFFER.getKey().equals(deliverStatus);
    }

    public Boolean isOverStage(){
        return DeliverStatusEnum.OVER.getKey().equals(deliverStatus);
    }

    public Boolean isRejectStage(){
        return deliverStatus % 2 == 0;
    }

    public Boolean isProcessIngStage(){
        return deliverStatus % 2 == 1;
    }
}
